package com.winner.monitor;

import org.springframework.context.ApplicationEvent;

/**
 * 自定义事件 就是一个普通的java类  继承ApplicationEvent 抽象类就可以自定义事件模型
 */
public class MyEvent extends ApplicationEvent {

	private static final long serialVersionUID = 1L;

	private Long id;

	private String message;

	public MyEvent(Object source) {
		super(source);
	}

	public MyEvent(Object source, Long id, String message) {
		super(source);
		this.id = id;
		this.message = message;
	}
	//get set 方法省略

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
